package com.qf.shop.system.config;

import com.qiniu.storage.UploadManager;
import com.qiniu.util.Auth;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QiniuYunConfig {

    private String AK = "1SvCrvXD0Ri6bibbnCOjVaiD5Aq84vmxGV8M-1Hj";
    private String SK = "lDt4V2_ymbPFMUJr7yppY-lUesmTpq5cs-Xo2BMH";

    @Bean
    public UploadManager uploadManager() {
        return new UploadManager(new com.qiniu.storage.Configuration());
    }
    @Bean
    public Auth qiqniuAuth(){
        return Auth.create(AK, SK);    // 1.连接文件服务器
    }
}
